function inheritObject(o) {
    function F() {}
    F.prototype = o;
    return new F();
}
let book = {
    name: 'js book',
    alikeBook: ['css book', 'html book']
};
let newBook = inheritObject(book);
//这里的name实际是_proto_的
console.log(newBook.name);
//这里的name是自己的
newBook.name = 'ajax book';
//这里的alike实际是_proto_的
newBook.alikeBook.push('flash book');
let anotherBook = inheritObject(book);
//这里的name是自己的
anotherBook.name = 'xml book';
console.log(newBook.name, newBook.alikeBook, anotherBook.name, anotherBook.alikeBook);
//这里的alikeBook是自己的
newBook.alikeBook = [1,2,3,4];
console.log(newBook.alikeBook);
//这里的alikeBook是proto的，所以不受影响
console.log(anotherBook.alikeBook);
